<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
    <div class="container">
        <h3>借阅图书</h3>
        <hr>
        <a th:href="@{/userOnes/new}" class="btn btn-primary btn-sm mb-3">新增借阅</a>
        <br>
        <table class="table table-bordered table-striped">
            <thead class="thread-dark">
            <tr>
                <th>用户昵称</th>
                <th>借出时间</th>
                <th>归还时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="aUserOne : ${userOnes}">
                <td th:text="${aUserOne.admName}"></td>
                <td th:text="${aUserOne.userGender}"></td>
                <td th:text="${aUserOne.birthday}"></td>
                <td>
                    <a th:href="@{/userOnes/update(id=${aUserOne.userId})}" class="btn btn-info btn-sm">更新</a>
                    <a
                            th:href="@{/userOnes/delete(id=${aUserOne.userId})}"
                            class="btn btn-danger btn-sm"
                            onclick="if (!(confirm('确定要删除这本书吗？'))) return false"
                    >删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</body>
</html>